﻿using DAL.Entities;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL.Configurations
{
    public class YqzsConfiguration : EntityTypeConfiguration<Yqzs>
    {
        public YqzsConfiguration()
        {
            ToTable("yqzs").HasKey(x => x.YqzsId);
            Property(x => x.Symptom).HasMaxLength(50);
            Property(x => x.SurveyResult).HasMaxLength(200);
            Property(x => x.Remark).HasMaxLength(2000);

            HasMany(x => x.Tracks).WithRequired(x => x.Yqzs).HasForeignKey(x => x.YqzsId);
        }
    }
}
